package io.kiki.stack.netty.processor;


import io.kiki.stack.netty.channelManager.Channel;
import io.kiki.stack.netty.invoker.RequestContext;

public interface BizContext {

    String getRemoteAddress();

    String getRemoteHost();

    int getRemotePort();

    Channel getChannel();

    /**
     * check whether request already timeout
     *
     * @return true if already timeout, you can log some useful info and then discard this request.
     */
    boolean isRequestTimeout();

    int getClientTimeout();

    long getArriveTimestamp();

    void put(String key, String value);

    String get(String key);

    RequestContext getInvokeContext();
}